/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package prototype.runtime.impl.goal;

import prototype.persistence.pojo.Goal;

/**
 *
 * @author Server
 */
public class AbstractRuntimeGoal {
    public final static int ONGOING = 0;
    public final static int ACCOMPLISHED = 1;
    public final static int FAILED = 2;
    private Goal goal;
    protected int status;

    public AbstractRuntimeGoal() {
        status = ONGOING;
    }


    public Goal getGoal() {
        return goal;
    }

    public void setGoal(Goal goal) {
        this.goal = goal;
    }

    public String getStatus() {
        if(status == ONGOING) {
            return "On Going";
        } else if(status == ACCOMPLISHED) {
            return "Accomplished";
        } else if(status == FAILED) {
            return "Failed";
        } else {
            return "Unknown";
        }
    }

    public void setStatus(int status) {
        this.status = status;
    }

}
